package com.ty.tour.service.serviceImp;


import com.ty.tour.pojo.Orders;
import com.ty.tour.mapper.OrderMapper;
import com.ty.tour.service.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Author is ***
 * @since 2020-03-19
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Orders> implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Orders> userOrder(Integer userId) {
        return orderMapper.userOrder(userId);
    }

    @Override
    public boolean saves(Orders order) {
        return orderMapper.save(order);
    }

    @Override
    public Integer deleteById(Integer orderId) {
        return orderMapper.deleteSingle(orderId);
    }
}
